package com.qrcode.service.impl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.qrcode.dao.UserDao;
import com.qrcode.entity.User;
import com.qrcode.service.UserService;

@Service
@Transactional
public class UserServiceImpl implements UserService{
	
	protected Logger log = LoggerFactory.getLogger(getClass());
	@Autowired
	private UserDao userDao;
	
	@Override
	public void insertUser(User user) {
		// TODO Auto-generated method stub
		 userDao.insertUser(user);
	}

	@Transactional(readOnly = true)
	public User getUserById(String id) {
		// TODO Auto-generated method stub
		return userDao.getUserById(id);
	}

}
